
/**
 * @description 用于买家订单列表
 * 
 */

type OrderStatus = 'pending' | 'paid' | 'shipped' | 'delivered' | 'completed' | 'cancelled';

interface Order {
  id: number;
  createdAt: string;
  status: OrderStatus;
  total: string;
  items: {
    skuId: number;
    name: string;
    price: string;
    quantity: number;
  }[];
}


/**
 * @description 用于商家订单列表
 * 
 */


interface OrderItemDetail {
  skuId: number;
  name: string;
  price: string;
  quantity: number;
  subtotalPrice: string;
}


interface OrderDetail {
  id: number;
  buyerName: string;
  createdAt: string;
  status: OrderStatus;
  totalPrice: string;
  items: OrderItemDetail[];
}


export type { OrderDetail, Order, OrderStatus, OrderItemDetail as OrderDetailItem };